# The program uses a try-except block to catch the ValueError exception that is raised if the user enters a non-integer value.
try:
    age = int(input("Enter your age: "))
    income = 10000
    risk = income / age
    print(age)
except ZeroDivisionError:
    print("Invalid input. Please enter a valid age.")
# 自己定义报错的形式，而不让代码崩溃
except ValueError:
    print("Invalid input. Please enter a valid age.")
